package com.mdtx.base.security.context;

import com.mdtx.base.security.AccessToken;

/**
 * token本地对象
 *
 * @author 猫啊
 * @create 2017-09-02 15:05
 **/
public class ThreadLocalToken {

    private static ThreadLocal<AccessTokenContext> context = new ThreadLocal<>();

    public static AccessTokenContext getAccessTokenContext(){
        return context.get();
    }

    public static void setAccessTokenContext(AccessTokenContext token){
        context.set(token);
    }

    public static void removeAccessTokenContext(){
        context.remove();
    }
}
